package com.example.gymlearning.mapper;

import com.example.gymlearning.entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper {

    //创建各种操作数据库的方法
    //新增用户
     int insertUser(User user);

    //根据名字查找用户
    User selectUserByName(String username);


    int selectCount();

    //修改用户
    int updateUser(User user);

    //根据邮件查找用户
    User findByEmail(String email);

    //根据ID查找用户
    User getUserById(long  id);

    //查找所有用户
    List<User> getAllUser();

}
